﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


class EventSetRigidbody : MonoBehaviour
{
    public Rigidbody2D rigidbody2D;
    // false 的时候接受重力，true 的时候不接受重力
    public void SetIsKinematic(bool enable)
    {
        if (null != rigidbody2D)
        {
            rigidbody2D.isKinematic = enable;
        }
        else
        {
            Debug.LogError("rigidbody2D is null");
        }

    }
}
